package org.mzy.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.mzy.basic.domain.BaseDomain;
import org.mzy.system.domain.Role;
import org.mzy.user.domain.Logininfo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Package: org.mzy.org.domain
 * @ClassName: Employee
 * @Date:2022/9/30 21:20
 * @Description:
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Employee extends BaseDomain {
    private Long id;
    private String username;
    private String phone;
    private String email;
    private String salt;
    private String password;
    private Integer age;
    private Integer state = 1;
    private Long departmentId;
    private Long logininfoId;
    private Long shopId;
    private Department department;
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Employee> children = new ArrayList<>();
    // 二次密码
    private String comfirmPassword;
    // 所属部门
    private String deptName;

    private Logininfo logininfo;
    // 角色id集合
    private List<Long> roles;
    // 角色
    private Role role;

}
